<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">

    <title>index</title>
       <style>
        h1,h2,h3,h4,h5,h6{
            font-family:微软雅黑；
        }
    </style>
    <link rel="stylesheet" href="/static/bootstrap-3.3.7-dist/css/bootstrap.min.css">
    <link rel="stylesheet" href="/static/bootstrap-3.3.7-dist/css/bootstrap-theme.min.css">
     <link href="/static/css/main.css" rel="stylesheet">
</head>
<body>
<!--导航-->
{% include "../base/header.html" %}

  <div class="container-fluid">
    <div class="row">
        <!--菜单-->
      {% include "../base/menu.html" %}

      <div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main">
        <h2 class="sub-header">Section title</h2>
        <a class="btn btn-success" href="add">添加</a>
        <div class="table-responsive">
          <table class="table table-striped">
            <thead>
              <tr>
                <th>id</th>
                <th>name</th>
                <th>gender</th>
                <th>age</th>
                <th>hobbies</th>
                  <th>email</th>
                <th>edit</th>
              </tr>
            </thead>
            <tbody>
              <tr>
                <td>1,001</td>
                <td>Lorem</td>
                <td>ipsum</td>
                <td>dolor</td>
                <td>sit</td>
              </tr>


                 {% for d in data %}
                  <tr>
                    <td>{{ d.id }}</td>
                    <td>{{ d.name }}</td>

                    {% if d.gender == 1%}
                        <td>女</td>
                    {% elif d.gender == 0%}
                        <td>男</td>
                    {% endif %}
                    <td>{{ d.age }}</td>
                    <td>{{ d.hobby }}</td>
                    <td>{{ d.email }}</td>
                    <td>
                      <a href="edit?id={{ d.id }}"> 编辑</a>
                      <a href="delete?id={{ d.id }}"> 删除</a>
                    </td>
                  </tr>

                 {% endfor %}


            </tbody>
          </table>
        </div>
      </div>
    </div>
  </div>




<script src="/static/js/jquery-1.12.4.js"></script>
<script src="/static/bootstrap-3.3.7-dist/js/bootstrap.js"></script>
</body>
</html>